<?php
session_start();

include("fckeditor/fckeditor.php") ;

if (!isset($_SESSION["userID"]))
	header("location: login.php");

require_once '../lib/ServicoNoticia.php';

if (isset($_REQUEST["id"]))
{
	$result = ServicoNoticia::getNoticia($_REQUEST["id"]);
	
}

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>III Congresso Norte e Nordeste de Administra&ccedil;&atilde;o - Administradores: Empreendedores por Natureza no Mercado Globalizado</title>
<link rel="stylesheet" href="style.css" type="text/css" />
<link href="fckeditor/editor/sample.css" rel="stylesheet" type="text/css" />

</head>
<body>
	<table width="90%">
		<tr>
			<td width="200px">
				<img src="../imagens/logo_connad.jpg"></img>
			</td>
			<td align="left">
				<h2>III Congresso Norte e Nordeste de Administra&ccedil;&atilde;o</h2> 
				<b>Administradores: Empreendedores por Natureza no Mercado Globalizado</b>
			</td>
		</tr>
		<tr>
			<td colspan="2">
				<div id="left">
					<?php require_once 'menu.php'; ?>
				</div>
				<div id="content">
					<form action="gravarNoticia.php" method="post" target="_self">
						<input type="hidden" name="id" value="<?php if (isset($result["id"])){print($result["id"]);} ?>" />
						
						T&iacute;tulo: <br /> 
						<input id="titulo" name="titulo" maxlength="100" size="60" value="<?php if (isset($result["titulo"])){print($result["titulo"]);} ?>" /><br /><br />	
						<?php
							
						$sBasePath = 'fckeditor/';
						
						$oFCKeditor = new FCKeditor('texto') ;
						$oFCKeditor->BasePath = $sBasePath ;
						//$oFCKeditor->Config['SkinPath'] = $sBasePath . 'editor/skins/' . preg_replace("/[^a-z0-9]/i", "", 'silver') . '/' ;
						if (isset($result["texto"]))				
							$oFCKeditor->Value = $result["texto"] ;
						$oFCKeditor->Create() ;
						
						?>
						<br />
						<input type="submit" value="Submit" />
					</form>
				</div>
			</td>
		</tr>
	</table>
</body>
</html>
